#include "HufArc.h"
jmp_buf errorBuf;
_env envInf;
/*int main (int argc, char * argv[])
{
	int i = 0;
	int m = 0;
	int count = 1;
	int flag = 0;
	int sndFlag = 0;
	char ** fileNames = NULL;
	int erCode = 0;
//	jmp_buf errorBuf;
	if ( (erCode = setjmp (errorBuf)) != 0) {
		/*
		#define SIGN_ERR 1
#define ARC_IWRITE 4
#define OPEN_FILE_ERR 5
#define OPEN_ERR 8
#define READ_ERR 9
#define WRITE_ERR 10
#define WRITE_ERR2 110
#define CS_ERR 11
#define ARC_TO_ARC 12
#define ERR_ARC_DEL 13
#define ERR_TMP_ARC_REN 14
#define ERR_ARC_REN 15
#define ERR_FILE_REN 16
#define ERR_NULL_STR 17
#define ERR_REPL_OLD_FILE 18
#define ERR_ARC_OPEN 19
#define COPY_ERR 20
#define ERR_NAME_ARC 23
*//*
		printf ("error %d\n",erCode);
		system ("pause");
		return 0;
		
	}
for (i = 1; i<argc; i++)
	{
		if (argv[i][0] == '-')
		{
			switch (argv[i][1]) {
			case 'a':
				if (flag == 0) 
				{ //I use next values of flag: 1 - adding files, 2 - extracting files, 3 - deleting files
				flag = 1;
				break;
				} else {
					printf ("Many arguments");
					system ("pause");
					return 0;
				}
			case 'x':
				if (flag == 0) 
				{
					flag = 2;
					break;
				} else {
					printf ("Many arguments");
					system ("pause");
					return 0;
				}
			case 'd':
				if (flag == 0) 
				{
					flag = 3;
					break;
				} else {
					printf ("Many arguments");
					system ("pause");
					return 0;
				}
			case 'l':
				if (sndFlag < 11)
				{
					sndFlag += 1;
					break;
				} else {
					printf ("Many arguments");
					system ("pause");
					return 0;
				}
			case 't':
				if (sndFlag <= 1)
				{
					sndFlag += 10;
					break;
				} else {
					printf ("Many arguments");
					system ("pause");
					return 0;
				}
			}
		} else {
			
			fileNames = (char **) realloc (fileNames, sizeof(char**)*count);
			fileNames[count - 1] = argv[i];
			count++;
		}
}
fileNames = (char **) realloc (fileNames, sizeof(char**)*count);
fileNames[count - 1] = NULL;
if ((count<=2) && (flag != 0))
	{
		printf ( "Need more arguments\n" );
		system ("pause");
		return 0;
	} 
// Checking files on individuals
i = 0;
while (fileNames[i])
{
	m = 0;
	while (fileNames[m])
	{
		if (i != m)
		{
			if (!(strcmp (fileNames[i],fileNames[m])))
			{
				printf ("Similar files\n");
				system ("pause");
				return 0;
			}
		}
		m++;
	}
	i++;
}
//working with arguments
switch (flag)
{
case 1:
	addFiles (fileNames);
	break;
case 2:
	extractFiles (fileNames);
	break;
case 3:
	deleteFile (fileNames);
	break;
}
if (sndFlag != 0)
{
	startTestListFunc (fileNames[0],sndFlag);
}
	system("pause");
	return 0;
}
*/